package com.runoob.Contents.ex04;
import java.io.File;
public class Main {
    public static void main(String[] args) {
        File file = new File("./testdir");
        if (file.isDirectory()){
            if (file.list().length>0){
                System.out.println("目录不为空");
            }
            else {
                System.out.println("目录为空");
            }
        }else {
            System.out.println("不是一个目录！");
        }
    }
}
